<?php
abstract class DbData {

	/*
	 * Normaler User
	 */

	protected $DbServer = "localhost";
	protected $DbUser = "root";
	protected $DbPassword = "asus5688";
	protected $DbTabele = "Pagemaker";
	protected $Perfix = "";

	function DbData(){		
	    $ServerName = str_replace("www.", "", $_SERVER['HTTP_HOST']);
	    
		if (is_file($_SERVER['DOCUMENT_ROOT'].'/conf/'.$ServerName.'.php')) {
	    	$tmps = include $_SERVER['DOCUMENT_ROOT'].'/conf/'.$ServerName.'.php';	 
	
	    	if(array_key_exists("DbServer", $tmps)){
	    			$this->DbServer = $tmps["DbServer"];
	    		}
	    		if(array_key_exists("DbUser", $tmps)){
	    			$this->DbUser = $tmps["DbUser"];
	    		}
	    		if(array_key_exists("DbPassword", $tmps)){
	    			$this->DbPassword = $tmps["DbPassword"]; 
	    		}
	    		if(array_key_exists("DbTabele", $tmps)){
	    			$this->DbTabele = $tmps["DbTabele"]; 
	    		}
	    		if(array_key_exists("Perfix", $tmps)){
	    			$this->Perfix = $tmps["Perfix"]; 
	    		}
	    }
	}
}

?>